
class Class{
    constructor(_number){
        this.number = _number ;
    }
    getDisplayName(){
        return `Class ${this.number}` ;
    }
    assignLeader(_student){
        if(this.isIn(_student)){
            this.leader = _student ;
            return true ;//班长设置成功
        }else{
            console.log(`It is not one of us.`);
            return false ;//班长设置失败
        }
    }
    appendMember(_student){
        _student.klass = this ;
    }
    isIn(_student){
        return _student.klass === this ;
    }
}
module.exports = Class ;